/*简介*/
$(function(){
	var total=$('.tab_pic ul li').length;
	$('.tab_pic ul li').eq(0).addClass('on');
	$('.tab_txt ul li').eq(0).addClass('on');
	$('.tab_pic ul').width(total*200);
	$('.tab_txt ul').width(total*200);
	$('.next').click(function(){
		var num=$('.tab_pic ul li').length;
	    var index=$('.tab_pic ul li.on').index('.tab_pic ul li');
		var on=index+1<num?index+1:0;
		var pwidth=parseInt(on*200);
		var twidth=parseInt(on*200);
		$('.tab_pic ul li').eq(on).addClass('on').siblings().removeClass('on');
		$('.tab_pic ul').stop().animate({left: -pwidth}, "slow");
		$('.tab_txt ul li').eq(on).addClass('on').siblings().removeClass('on');
		$('.tab_txt ul').stop().animate({left: -twidth}, "slow");
	});
	$('.prev').click(function(){
		var num=$('.tab_pic ul li').length;
	    var index=$('.tab_pic ul li.on').index('.tab_pic ul li');
		var on=index==0?num-1:index-1;
		var pwidth=parseInt(on*200);
		var twidth=parseInt(on*200);
		$('.tab_pic ul li').eq(on).addClass('on').siblings().removeClass('on');
		$('.tab_pic ul').stop().animate({left: -pwidth}, "slow");
		$('.tab_txt ul li').eq(on).addClass('on').siblings().removeClass('on');
		$('.tab_txt ul').stop().animate({left: -twidth}, "slow");
	});
	
})



window.onload=function()//用window的onload事件，窗体加载完毕的时候
	{
		// document.getElementById("mendian0").className="mendian_hover mendian";
 		document.getElementById("TabTab03Con0").style.display="block";
		document.getElementById("TabTab03Con1").style.display="block";
		document.getElementById("TabTab03Con2").style.display="block";
		document.getElementById("TabTab03Con3").style.display="block";
		// for(num=0;num<1;num++)
		// {
		// 	document.getElementById("sTabTab03Con"+num).style.display="none";
		// }	   
	}
	function setTab03Syn ( i )
	{
		selectTab03Syn(i);
	}
	
	function selectTab03Syn ( i )
	{
		switch(i){
			case 0:
			document.getElementById("mendian0").className="mendian_hover mendian";
			document.getElementById("mendian1").className="mendian";
			document.getElementById("mendian2").className="mendian";
			document.getElementById("mendian3").className="mendian";
			document.getElementById("TabTab03Con0").style.display="block";
			document.getElementById("TabTab03Con1").style.display="none";
			document.getElementById("TabTab03Con2").style.display="none";
			document.getElementById("TabTab03Con3").style.display="none";
			break;
			case 1:
			document.getElementById("mendian0").className="mendian";
			document.getElementById("mendian1").className="mendian_hover mendian";
			document.getElementById("mendian2").className="mendian";
			document.getElementById("mendian3").className="mendian";
			document.getElementById("TabTab03Con0").style.display="none";
			document.getElementById("TabTab03Con1").style.display="block";
			document.getElementById("TabTab03Con2").style.display="none";
			document.getElementById("TabTab03Con3").style.display="none";
			break;
			case 2:
			document.getElementById("mendian0").className="mendian";
			document.getElementById("mendian1").className="mendian";
			document.getElementById("mendian2").className="mendian_hover mendian";
			document.getElementById("mendian3").className="mendian";
			document.getElementById("TabTab03Con0").style.display="none";
			document.getElementById("TabTab03Con1").style.display="none";
			document.getElementById("TabTab03Con2").style.display="block";
			document.getElementById("TabTab03Con3").style.display="none";
			break;
			case 3:
			document.getElementById("mendian0").className="mendian";
			document.getElementById("mendian1").className="mendian";
			document.getElementById("mendian2").className="mendian";
			document.getElementById("mendian3").className="mendian_hover mendian";			
			document.getElementById("TabTab03Con0").style.display="none";
			document.getElementById("TabTab03Con1").style.display="none";
			document.getElementById("TabTab03Con2").style.display="none";
			document.getElementById("TabTab03Con3").style.display="block";
			break;
		}
	}

	function ssetTab03Syn ( i )
	{
		sselectTab03Syn(i);
	}
	function sselectTab03Syn ( i )
	{
		for(a=0;a<=1;a++)
		{
			document.getElementById("sasfgsa"+a).style.color="";
 		}
		switch(i){
			case 0:
 			document.getElementById("sasfgsa0").style.color="#198339";			
			break;
			case 1:
			document.getElementById("sasfgsa1").style.color="#198339";		
			break;
	}
}

